import { createRequest } from '/@/api/service';
const module = 'ib/parking/v1/ParkRecordApi/';

/**
 * @function 进出记录表查询
 * @param data
 * @param header
 * @returns {Promise}
 */
function PARK_RECORD_LIST_QUERY(
  data: ParkRecordApi.ParkRecordListQueryReq,
  header: object = {},
): Promise<ParkRecordApi.ParkRecordListQueryResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryParkRecordList`,
    data,
    header,
    'POST',
  );
}

/**
 * @function 删除进出记录
 * @param data
 * @param header
 * @returns {Promise}
 */
function DELETE_PARK_RECORD(
  data: ParkRecordApi.DeleteParkRecordReq,
  header: object = {},
): Promise<ParkRecordApi.DeleteParkRecordResp> {
  return createRequest(`${process.env.APP_API_URL}${module}deleteParkRecord`, data, header, 'POST');
}

export { PARK_RECORD_LIST_QUERY, DELETE_PARK_RECORD };
